/*
package com.eapi.project.controller;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.eapi.eapicommom.model.entity.InterfaceInfo;
import com.eapi.eapicommom.model.entity.User;
import com.eapi.project.model.entity.Invokerecord;
import com.eapi.project.service.InterfaceInfoService;
import com.eapi.project.service.InvokerecordService;
import com.eapi.project.service.UserService;
import org.apache.rocketmq.client.apis.*;
import org.apache.rocketmq.client.apis.consumer.ConsumeResult;
import org.apache.rocketmq.client.apis.consumer.FilterExpression;
import org.apache.rocketmq.client.apis.consumer.FilterExpressionType;
import org.apache.rocketmq.client.apis.consumer.PushConsumer;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Collections;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@RestController
@CrossOrigin(origins = "http://localhost:8000", methods = {RequestMethod.GET}, allowedHeaders = "*", allowCredentials = "true")
public class SseSentTestController {

    private ExecutorService nonBlockingService = Executors.newCachedThreadPool();

    @GetMapping("/ssSent")
    public SseEmitter getSseStream(@RequestParam Long interfaceInfoId, HttpServletRequest request) throws InterruptedException, ClientException, IOException {
        SseEmitter emitter = new SseEmitter(120000L);
        for (int i = 0; i < 5; i++) {
            emitter.send(i);
        }
        return emitter;
    }

    public String getContent(String bodyStr, String tag) {
        String contentMessage = null;
        try {
            JSONObject fullResponse = JSONUtil.parseObj(bodyStr);
            contentMessage = fullResponse.getStr(tag);
        } catch (Exception e) {
            System.out.println("Error: " + e);
        }

        return contentMessage;
    }


}*/
